<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>首页 | 作业管理系统后台</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.5 -->
    <link rel="stylesheet" href="__PUBLIC__/Admin/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="__PUBLIC__/Admin/other/font-awesome/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="__PUBLIC__/Admin/other/ionicons/ionicons.min.css">
    <!-- Additional styles -->
    <block name="additional-styles"></block>
    <!-- Theme style -->
    <link rel="stylesheet" href="__PUBLIC__/Admin/dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
    page. However, you can choose any other skin. Make sure you
    apply the skin class to the body tag so the changes take effect.
    -->
    <link rel="stylesheet" href="__PUBLIC__/Admin/dist/css/skins/skin-blue.min.css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body class="hold-transition skin-blue fixed">
    <div class="wrapper">

        <!-- Main Header -->
        <header class="main-header">

            <!-- Logo -->
            <a href="{:U('Index/index')}" class="logo">
                <!-- mini logo for sidebar mini 50x50 pixels -->
                <span class="logo-mini">
                    作业管理
                </span>
                <!-- logo for regular state and mobile devices -->
                <span class="logo-lg">
                    作业管理
                </span>
            </a>

            <!-- Header Navbar -->
            <nav class="navbar navbar-static-top" role="navigation">
                <!-- Sidebar toggle button-->
                <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only">Toggle navigation</span>
                </a>
                <!-- Navbar Right Menu -->
                <div class="navbar-custom-menu">
                    <ul class="nav navbar-nav">
                        <!-- User Account Menu -->
                        <li class="dropdown user user-menu">
                            <!-- Menu Toggle Button -->
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <!-- The user image in the navbar-->
                                <img src="__PUBLIC__/Admin/dist/img/user2-160x160.jpg" class="user-image" alt="User Image">
                                <!-- hidden-xs hides the username on small devices so only the image appears. -->
                                <span class="hidden-xs">{:get_current_user_id()}</span>
                            </a>
                            <ul class="dropdown-menu">
                                <!-- The user image in the menu -->
                                <li class="user-header">
                                    <img src="__PUBLIC__/Admin/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">

                                    <p>
                                        {:get_current_user_name()} - {:get_current_role_name()}
                                    </p>
                                </li>
                                <!-- Menu Body -->
                                <li class="user-body">
                                    <!-- 
                                    <div class="row">
                                        <div class="col-xs-4 text-center">
                                            <a href="#">Followers</a>
                                        </div>
                                        <div class="col-xs-4 text-center">
                                            <a href="#">Sales</a>
                                        </div>
                                        <div class="col-xs-4 text-center">
                                            <a href="#">Friends</a>
                                        </div>
                                    </div>
                                     -->
                                    <!-- /.row --> </li>
                                <!-- Menu Footer-->
                                <li class="user-footer">
                                    <div class="pull-left">
                                        <!-- <a href="#" class="btn btn-default btn-flat">Profile</a> -->
                                    </div>
                                    <div class="pull-right">
                                        <a href="{:U('Login/logout')}" class="btn btn-default btn-flat">退出</a>
                                    </div>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </header>
        <!-- Left side column. contains the logo and sidebar -->
        <aside class="main-sidebar">

            <!-- sidebar: style can be found in sidebar.less -->
            <section class="sidebar">
                <!-- Sidebar Menu -->
                <ul class="sidebar-menu">
                    <php>
                        $rules = get_current_rules_classified();
                    </php>
                    <volist name="rules" id="category" offset="1">
                        <li class="treeview" id="{$key}">
                            <a href="#">
                                <i class="{$category['i_class']}"></i>
                                <span>{$category['name']}</span>
                                <i class="fa fa-angle-left pull-right"></i>
                            </a>
                            <ul class="treeview-menu">
                                <volist name="category.controllers" id="vo">
                                    <li id="{:strtolower($vo[0])}"><a href="{:U($vo[0] . '/index')}">{$vo[1]}</a></li>
                                </volist>
                            </ul>
                        </li>                        
                    </volist>
                    <!--                    
                    <li class="treeview active">
                        <a href="#">
                            <i class="fa fa-university"></i>
                            <span>学院管理</span>
                            <i class="fa fa-angle-left pull-right"></i>
                        </a>
                        <ul class="treeview-menu">
                            <li>
                                <a href="{:U('Academy/index')}">学院管理</a>
                            </li>
                            <li>
                                <a href="{:U('Major/index')}">专业管理</a>
                            </li>
                            <li>
                                <a href="{:U('Class/index')}">班级管理</a>
                            </li>
                            <li>
                                <a href="{:U('Course/index')}">课程管理</a>
                            </li>
                        </ul>
                    </li>
                    <li class="treeview">
                        <a href="#">
                            <i class="fa fa-user"></i>
                            <span>用户管理</span>
                            <i class="fa fa-angle-left pull-right"></i>
                        </a>
                        <ul class="treeview-menu">
                            <li>
                                <a href="{:U('Administrator/index')}">管理员管理</a>
                            </li>
                            <li>
                                <a href="{:U('Teacher/index')}">教师管理</a>
                            </li>
                            <li>
                                <a href="{:U('Student/index')}">学生管理</a>
                            </li>
                        </ul>
                    </li>
                    <li class="treeview">
                        <a href="#">
                            <i class="fa fa-book"></i>
                            <span>作业管理</span>
                            <i class="fa fa-angle-left pull-right"></i>
                        </a>
                        <ul class="treeview-menu">
                            <li>
                                <a href="#">Link</a>
                            </li>
                            <li>
                                <a href="#">Link</a>
                            </li>
                        </ul>
                    </li>
                    -->
                </ul>
                <!-- /.sidebar-menu -->
            </section>
            <!-- /.sidebar -->
        </aside>

        <block name="content-wrapper">
            <!-- Content Wrapper. Contains page content -->
            <div class="content-wrapper">
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                        Page Header
                        <small>Optional description</small>
                    </h1>
                    <ol class="breadcrumb">
                        <li>
                            <a href="#">
                                <i class="fa fa-dashboard"></i>
                                Level
                            </a>
                        </li>
                        <li class="active">Here</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content">
                    <!-- Your Page Content Here -->
                </section>
                <!-- /.content -->
            </div>
            <!-- /.content-wrapper -->
        </block>

        <!-- Main Footer -->
        <footer class="main-footer">
            <!-- To the right -->
            <!-- <div class="pull-right hidden-xs">Anything you want</div> -->
            <!-- Default to the left -->
            <!-- <strong>Copyright &copy; 2016 kevinbai.</strong>All rights reserved. -->
        </footer>
    </div>
    <!-- ./wrapper -->

    <!-- REQUIRED JS SCRIPTS -->

    <!-- jQuery 2.1.4 -->
    <script src="__PUBLIC__/Admin/plugins/jQuery/jQuery-2.2.0.min.js"></script>
    <!-- Bootstrap 3.3.5 -->
    <script src="__PUBLIC__/Admin/bootstrap/js/bootstrap.min.js"></script>
    <php>
        $current_controller_name = CONTROLLER_NAME;
        $current_category_id = get_current_category_id();
    </php>
    <script>
        $(function() {
            $("#{:strtolower($current_category_id)}").addClass('active');
            $("#{:strtolower($current_controller_name)}").addClass('active');            
        });
    </script>
    <!-- Additional scripts -->
    <block name="additional-scripts"></block>
    <!-- SlimScroll -->
    <script src="__PUBLIC__/Admin/plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <!-- FastClick -->
    <script src="__PUBLIC__/Admin/plugins/fastclick/fastclick.js"></script>
    <!-- AdminLTE App -->
    <script src="__PUBLIC__/Admin/dist/js/app.min.js"></script>
</body>
</html>